﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using FOBVT.Web.MainClass;

namespace FOBVT.Web.DBUtility.ManagerImpl
{
	public class NewsManager
	{
		public DataTable GetNewsListAll()
		{
			return YOCOSDa.NewsManager.GetNewsListAll(typeof(FOBTVNews));
		}

		public DataTable GetLatestNewsList(int newsnum)
		{
			return YOCOSDa.NewsManager.GetLatestNewsList(typeof(FOBTVNews), newsnum);
		}

		public DataTable GetNewsListPagin(PagingEntity pe)
		{
			return YOCOSDa.NewsManager.GetNewsListPagin(typeof(FOBTVNews), pe);
		}

		public FOBTVNews GetNewsById(int Id)
		{
			FOBTVNews news = new FOBTVNews();
			news.ID = Id;
			return YOCOSDa.NewsManager.GetNewsById(news);
		}
		/// <summary>
		/// 更新
		/// </summary>
		/// <param name="news"></param>
		/// <returns></returns>
		public bool InsertNews(FOBTVNews news)
		{
			return YOCOSDa.NewsManager.InsertNews(news);
		}

		public bool UpdateNews(FOBTVNews news)
		{
			return YOCOSDa.NewsManager.UpdateNews(news);
		}

		public bool DeleteNews(Int64 Id)
		{
			FOBTVNews news = new FOBTVNews();
			news.ID = Id;
			return YOCOSDa.NewsManager.DeleteNews(news);
		}

		public bool DeleteNewsByIds(string Ids)
		{
			return YOCOSDa.NewsManager.DeleteNewsByIds(typeof(FOBTVNews), Ids);
		}
	}
}